package com.licq.ldoc.parser.impl.annotation;

import java.lang.annotation.Annotation;

import com.licq.ldoc.domain.AbstractNode;
import com.licq.ldoc.parser.AnnotationParsee;
import com.licq.ldoc.parser.impl.AbstractParser;
import com.licq.ldoc.parser.impl.TargetIgnorableAnnotationParsee;

public class RQOnlyAnnotationParsee extends TargetIgnorableAnnotationParsee {

	public RQOnlyAnnotationParsee(AnnotationParsee successor) {
		super(successor);
	}
	
	@Override
	protected void doParseTo(AbstractNode node, Annotation annotation) {
		Class<?> topClazz = AbstractParser.getCurrentStatus().getTopClazz();
		if (!topClazz.getSimpleName().endsWith("RQ")) {
			node.setIgnored(true);
		}
	}

}
